import request from '@/utils/request'
import {
	ref,
} from 'vue'

export default () => {
	const sign = async (data) => {
		return await request.post(`mini/ticket/sign`, data)
	}
	const showTicket = async (id) => {
		return await request.get(`mini/ticket/${id}`)
	}
	
	const ticketPass = async (ticket_id) => {
		return await request.post(`mini/ticket/pass`,{
			id:ticket_id
		})
	}
	
	const ticketStart = async (data) => {
		return await request.post(`mini/ticket/start`,data)
	}
	
	const changeAbnormal = async (data) => {
		return await request.post(`mini/ticket/abnormal`,data)
	}
	
	
	const confirmTicket = async (data) => {
		return await request.post(`mini/ticket/confirm`,data)
	}
	
	return {
		sign,
		showTicket,
		ticketPass,
		ticketStart,
		confirmTicket,
		changeAbnormal
	}
}